Cheater suppression and stochastic clearance through quorum sensing

The evolutionary consequences of quorum sensing in regulating bacterial cooperation are not fully understood. In this study, we reveal unexpected effects of regulating public good production through quorum sensing on bacterial population dynamics, showing that quorum sensing can be a collectively harmful alternative to unregulated production. We analyze a birth-death model of bacterial population dynamics accounting for public good production and the presence of non-producing cheaters. Our model demonstrates that when demographic noise is a factor, the consequences of controlling public good production according to quorum sensing depend on the cost of public good production and the growth rate of populations in the absence of public goods. When public good production is inexpensive, quorum sensing is a destructive alternative to unconditional production, in terms of the mean population extinction time. When costs are higher, quorum sensing becomes a constructive strategy for the producing strain, both stabilizing cooperation and decreasing the risk of population extinction.


Introduction
Cooperative behavior is widespread in bacteria [1], including coordinated swarming and public good production. These behaviors are often regulated through quorum sensing (QS) [2], in which individual bacteria produce and export small molecules called autoinducers (AI). When AI molecules accumulate to a sufficiently high concentration in the environment, and consequently within the bacteria producing them, they activate operons controlling the expression of genes critical for cooperation. While the biochemistry of some QS systems is well understood [2], QS is sensitive to a number of factors [3][4][5] and there are many proposed biological functions of QS which have been the subject of debate [6][7][8][9].
Evolutionary questions concerning QS function have largely focused on the ability of QScontrolled cooperation to combat invasion by non-cooperating cheaters in bacterial populations [10,11]. The question of how cooperation can evolve and be maintained in populations is a general problem in evolutionary biology [12], and the role of QS in the evolution of bacterial cooperation is of great interest in understanding bacterial social interactions. A number of possible resolutions to the problem of social cheaters in bacterial public good production include punishment of cheaters [13], dispersal into subpopulations [14], and the use of QS to regulate cooperation [1,8,15]. Regulation of public good production through QS has been shown to reduce the ability of cheaters to invade a population of producers [16].
The role of QS in maximizing population growth in the absence of cheaters has also been investigated as a rationale for QS-control of public good production [17]. Because public goods produced by bacteria can have density-dependent fitness benefits [18], regulation of public good production based on population density can be seen as an optimal control solution to maintaining a maximal population size balancing metabolic costs and benefits [19,20]. By maintaining a maximal population size, a population also maximizes its mean time to extinction, which is especially important with the possibility of unpredictable environmental changes.
Considering the threat of both cheater invasion and the onset of harmful environmental conditions that could lead to population extinction, there is a tension in the degree to which public good production is regulated. Unconditional public good production appears to be a self-defeating strategy, where non-producing cheaters will arise by mutation and reap all the benefits of public goods without experiencing any of the associated production costs. At the other extreme, a strategy where no public goods are produced (which could be a result of a successful cheater invasion of a cooperating population) should be vulnerable to extinction when the public goods are essential for growth or reducing the likelihood of death. The idea that quorum sensing is a moderate strategy between these two extremes has been explored previously [21]. However, to our knowledge, a full analysis of this tension explicitly considering both cheater fixation probability and mean population extinction time has not been carried out. What are the effects of QS-mediated regulation of public good production in terms of cheater suppression and overall population robustness? Does QS always protect against cheaters while also increasing long-term viability of the population?
In this work, we explore the effects of QS on cheater fixation and mean population extinction time in a simple birth-death model of mixed producer-cheater populations. Our model sacrifices much of the complexity of QS [3][4][5] in order to provide more general insight into how QS strategies influence the eco-evolutionary dynamics of bacterial colonies. We compare the QS strategy of public good production with an "always on" (AO) strategy, meaning that each producer cell unconditionally produces public goods at the maximum rate. Our models reflect bacterial populations where demographic stochasticity is an important factor in population dynamics. The role of demographic stochasticity in bacterial populations has been explored in past work [22][23][24][25], and is particularly important when populations are divided into subpopulations.
An important example of subdivided populations is Pseudomonas aeruginosa infections in the lungs of cystic fibrosis (CF) patients [26]. Bacteria often form small, dense biofilm aggregates in infections [27]. In CF lung infections, P. aeruginosa forms aggregates of at most *1, 000 cells [28], suggesting that demographic noise is an important factor. While biofilms are known to protect bacteria from the effects of antibiotics [29], the possibility of "stochastic clearance" where relatively small bacterial populations go extinct at sub-minimum inhibitory concentrations of antibiotics [24,30] suggests that extinction is a real possibility faced by P. aeruginosa aggregates in the presence of stressors such as antibiotics. Furthermore, while in vitro experimental evidence suggests that QS induction can occur within these aggregates [31], QS induction is unlikely to occur between distinct aggregates [32]. This evidence provides justification for our focus on single well-mixed sites in QS, an important first step towards a more realistic model incorporating interactions between separate aggregates and accounting for heterogeneity within single aggregates. We use the QS system controlling production of proteases by P. aeruginosa as inspiration for our model, where public goods increase the growth rate of all individuals while leaving death rates unaffected. Without the ability to produce proteases, P. aeruginosa starves when proteins are the sole source of carbon and nitrogen [33]. However, with the ability to produce and export proteases into their environment, P. aeruginosa can grow using the oligopeptides that proteases produce by cleaving exogenous proteins.
We find that while QS decreases cheater fixation probability for all examined public good costs and constitutive growth rates (growth rate in the absence of public goods), the population mean extinction time is only increased by QS for a well-defined set of cost-growth rate pairs. When mean extinction time is decreased by QS, there is an increased risk of stochastic clearance. By "stochastic clearance", we refer to the phenomenon where a population with a nonnegative mean net-growth rate has a finite time to extinction, due to stochastic copy number fluctuations. The cases where QS decreases mean extinction time as compared with an unconditional AO strategy is an example of a weak form of "evolutionary suicide" [34], where QS increases the relative fitness of the cheater strain while the entire population of both producers and cheaters is made more vulnerable to extinction. We call this situation destructive cheater suppression. Only when both the cost of public good production and the constitutive growth rate are large enough is QS a constructive strategy for the producers, in that both cheater fixation probability is reduced and mean extinction time is increased.

Results
We first briefly introduce the notation used throughout the remainder of this article. The number of producers in the population is written as n while the number of cheaters is m. When n = m = 0, the population of bacteria has gone extinct. The cost of public good production is c and the per-capita constitutive growth rate (in the absence of public goods) is λ 0 . The per-capita death rate for all individuals is μ 0 . The birth rates given n and m are l Pr n;m and l Ch n;m while the death rates are m Pr n;m and m Ch n;m , for the producers and cheaters, respectively ( Fig 1A). We write the cheater fixation probability as π Ch , the mean time to cheater fixation as τ Ch , and the mean time to population extinction as T . The model is fully described in the Materials and Methods section.
The phase diagram in Fig 1B shows the fraction of (n, m) pairs in the set fðn; mÞ 2 Z 2 j n; m > 0; n þ m � 100g in which the mean extinction time of a population regulating public good production through QS is larger than that using the AO strategy, as a function of the constitutive per capita growth rate, λ 0 � 0, and the cost of public good production, 0 � c � 1, representing the fraction of growth rate benefit provided by public goods alone. We first examine two points of interest on this phase diagram, c = 0.1, λ 0 = 0 and c = 0.15, λ 0 = 0.2 as marked in Fig 1B, and then discuss the general features of the phase diagram.

Quorum sensing is a destructive strategy in the absence of alternative nutrition sources
In agreement with previous work [16,35], we find that in the absence of alternate sources of nutrition (λ 0 = 0), QS reduces the probability of cheater fixation for a wide range of starting population compositions (Fig 2). We calculate the probability of cheaters fixing (Eq 9) in a small population with starting compositions satisfying 0 < n, 0 < m, and n + m � 100. We compare cases where no public good is produced (NP), where public good production is QS-controlled, and where public good production is always on (AO). The NP strategy corresponds to a cheater strain that produces autoinducer. Because there is no constitutive growth Overview of birth-death model and main results. A) Diagram of the two-dimensional birth-death process describing the dynamics of a bacterial population consisting of public good producers and cheaters. As an example, the population is shown with two producers and two cheaters. All possible subsequent states of the population are indicated, where a single producer or cheater can either arise through binary fission (with state-dependent rates λ Pr and λ Ch , respectively) or can die (with state-dependent rates μ Pr and μ Ch ). See Eqs 1-4 for the full forms of the birth and death rates. B) Phase diagram describing the fitness gains of quorum sensing (QS) over always on (AO) producers, as a function of constitutive growth rate (λ 0 ) and public good production cost (c). For each pair (λ 0 , c) we calculated the mean extinction time for all (n, m) pairs satisfying n � 0, m � 0, and n + m � 100 with the QS and AO strategies. The reported number is the fraction of these (n, m) pairs for which the mean extinction time for QS is greater than for AO (T QS n;m > T AO n;m ). In the bottom right-hand region (dark blue) regulating public good production through QS decreases mean extinction time for all (n, m) pairs, meaning that the AO strategy decreases the risk of population extinction. Here, QS is a destructive strategy. The upper region (yellow) is where QS increases the mean extinction time for all (n, m), a constructive strategy for the producers. The region labeled "mixed" indicates that QS increases mean extinction time for some (n, m) pairs while decreasing it for others.
https://doi.org/10.1371/journal.pcbi.1010292.g001 rate (λ 0 = 0), if the NP strategy is used there is no (n, m) pair for which the net population growth rate is non-negative. On the other hand, for the QS and AO populations, the white lines in Fig 2 represent the total population zero expected net growth contour. Because these lines represent the zero expected net growth rate contours of the entire population, they are not fixed points of the underlying deterministic behavior of the system, which only exist at the origin and at the intersection of the zero expected net growth contours with the producer axis. Thus, there can not be a long-lived population with a non-zero number of cheaters.
With a moderate cost to public good production (10% of the maximum growth rate benefit imparted by public goods), a QS strategy (Fig 2B) increases cheater fixation probability as Quorum sensing is a destructive strategy for producers when no alternate energy source is present (λ 0 = 0) and when public good cost is moderate (c = 0.1). Row 1: Cheater fixation probability from an initial population of n producers and m cheaters for A) no production (NP), B) quorum sensing (QS), and C) always on (AO) strategies. Row 2: Conditional mean first passage time to cheater fixation from initial population structure for D) no production, E) quorum sensing, and F) always on strategies. Row 3: Mean extinction time from initial population structure for G) no production, H) quorum sensing, and I) always on strategies. White traces: zero expected net total population growth contours. Inset plots in B), E), and H) show cheater fixation probability, cheater mean first passage time to fixation, and mean extinction time, respectively, for an initial population with one cheater and n producers. See S1

PLOS COMPUTATIONAL BIOLOGY
compared with an NP strategy (Fig 2A) while decreasing cheater fixation probability as compared with an AO strategy ( Fig 2C). This can be clearly seen in an invasion scenario with a single cheater present in the population (Fig 2C inset). For any public good production strategy, without any elaborate solutions such as policing [36] it is unavoidable that cheaters will become more likely to fix in a population. However, QS mitigates this possibility as compared with an AO strategy. Both the QS and AO strategies increase the mean time to cheater fixation (Fig 2E and 2F) and the mean time to extinction (Fig 2H and 2I) as compared with the NP strategy ( Fig 2D and 2G, respectively) for starting compositions with few cheaters and many producers. Our results match well with stochastic simulations (S1 and S2 Figs).
In order to explore the ecological consequences of public good production for the whole bacterial population, we calculated the mean time to extinction of the population given an initial composition of producers and cheaters. The mean extinction time has been proposed as a measure of bacterial tolerance to antibiotics [30], representing the ability of bacterial populations to persist when confronted with stressors. While QS reduces the probability of cheater fixation as compared to AO, the mean extinction time with QS ( Fig 2H) is greatly reduced as compared to AO ( Fig 2I). This suggests that with no alternate sources of nutrition, QS increases the relative fitness of producers while decreasing the overall population fitness as compared with AO. This scenario, which we call destructive cheater suppression, could be an example of evolutionary suicide [34] (see Discussion), though in a weak sense because the population becomes more likely to go extinct through fluctuations rather than a non-zero equilibrium population size disappearing [37]. For most, but not all, (n, m) pairs, the mean extinction time for QS is larger than for AO. This places the system in the "mixed" region of the phase diagram ( Fig 1B).
The qualitative differences in cheater fixation probabilities and mean extinction times between QS and AO were preserved for systems with carrying capacities of 200 (S3 Fig), twice the size considered in Fig 2 (see S1 and S2 Tables for the parameters used). While this does not guarantee that the destructive nature of QS in these conditions is independent of populations size, it does demonstrate insensitivity to the overall population size. Given that our model is not parameterized by experimental results, the population sizes we consider do not directly correspond to population sizes in real bacterial colonies. Instead, our model aims to capture key aspects of bacterial population dynamics when demographic noise plays a role, as discussed in the Introduction. The degree of demographic noise is related to the size of a population through the law of large numbers, where the standard deviation in the population size over the mean number of individuals is inversely proportional to the square root of the population size. For this reason we focus on small populations, where demographic noise is relatively large.

Alternative sources of nutrition enable constructive suppression through QS
Bacterial populations need not rely solely on the growth benefits of a public good. In some cases they may use alternative sources of nutrition which are not directly influenced by public good production. We consider the case in which the constitutive growth rate for individuals with zero public goods present is non-zero but small (20% of the maximal growth rate benefit provided by public goods alone). This non-zero constitutive growth rate allows for a small carrying capacity to appear in the NP case, indicated by the white line in the leftmost column of Fig 3. With the QS and AO strategies, the zero expected net growth contour reflects the NP carrying capacity when the number of producers is low, but increases markedly with more producers. Additionally, more cheaters can be accommodated with more producers present because of the public nature of the fitness benefits provided by producers. As in Fig 2, the only fixed points of the underlying deterministic dynamics are the origin and the intersections of the zero expected net growth contour with the axes.
As in the case of zero constitutive growth, QS ( Fig 3B) decreases the probability of cheater fixation over AO ( Fig 3C) for a wide range of starting population compositions, while increasing the fixation probability compared to NP (Fig 3A). The improvement of QS over AO can be clearly seen in the cheater invasion scenario in the inset of Fig 3B. However, with non-zero constitutive growth the mean time to cheater fixation for NP ( Fig 3D) and QS ( Fig 3E) are Quorum sensing is a constructive strategy for producers when an alternate energy source is present (λ 0 = 0.2) and when public good cost is moderate (c = 0.15). Row 1: Cheater fixation probability from an initial population of n producers and m cheaters for A) no production (NP), B) quorum sensing (QS), and C) always on strategies (AO). Row 2: Conditional mean first passage time to cheater fixation from initial population structure for D) no production, E) quorum sensing, and F) always on strategies. Row 3: Mean extinction time from initial population structure for G) no production, H) quorum sensing, and I) always on strategies. White traces: zero expected net total population growth contour. Inset plots in B), E), and H) show cheater fixation probability, cheater mean first passage time to fixation, and mean extinction time, respectively, for an initial population with a single cheater and n producers. See S1

PLOS COMPUTATIONAL BIOLOGY
comparable, while cheaters fix more quickly for AO ( Fig 3F). Again, our results match well with simulations (S4 and S5 Figs).
The presence of an alternative source of nutrition renders QS a beneficial strategy for producers (Fig 3) at a moderate public good production cost (15%). QS increases the mean extinction time of the population for all starting population compositions with at least one cheater and one producer over AO (Fig 3H and 3I). Both QS and AO increase the mean extinction time over NP (Fig 3G). From comparison with (Fig 2), it appears that the degree to which growth depends on alternative nutrition sources influences whether QS at moderate costs is destructive or constructive.
As when there is no constitutive growth, the qualitative differences between QS and AO were preserved for systems with carrying capacities of 200 as shown in S6 Fig (see S1 and S2 Tables for parameters).

Trade-offs between cheater suppression and mean extinction time
We next examine how varying the parameters controlling public good growth benefit and production affect whether QS is destructive or constructive. The effects of K a on the success of a single producer in colonizing a habitat and on the probability of a single cheater leading to fixation of cheaters in an established population of producers are shown in S14 and S15 Figs, respectively. This demonstrates the opposing factors in determining the optimal value of K a . Lower values of K a are beneficial to the growth of pure producer populations, balancing the costs and benefits of public good production, while large

Autoinducer production by cheaters is a destructive strategy
To this point, we have assumed that cheaters produce neither public goods nor autoinducer. What are the consequences of cheaters producing autoinducer while still not producing public goods? We performed the same analysis as in the previous sections using the growth rates in Eqs 5 & 6 which reflect equal autoinducer production by producers and cheaters. We compared these results to those presented in Fig 3, where an alternative nutrition source exists and cheaters do not produce autoinducer. Cheater signaling increases the probability of cheater fixation while decreasing the mean time to cheater fixation and the mean extinction time ( Fig  5). From the perspective of the cheater population, autoinducer production is a destructive strategy. Even though cheater signaling decreases mean extinction time, this result suggests that signaling cheaters are more likely to be observed in nature than non-signaling cheaters, provided that signaling cheater mutations are at least as likely to occur in a population as nonsignaling cheater mutations.

Producer advantage in the benefits of public goods reduces the advantages of QS
The role of the spatial structure of populations and the diffusive properties of their environments has recently been acknowledged as a possible explanation for why cheaters do not always fix in a population of producers [8]. Essentially, if producers are more likely to be close to other producers, and the benefits of the public good are spatially confined to an area close to a producer, cheaters will be unlikely to benefit from public goods. We examine how this type of advantage to producers effects our results by adding a non-zero constant a to the g parameter in the producer growth rate (Eq 1), which reflects the possibility that producers benefit more than cheaters from public goods because of their spatial arrangement. We look at how the results of   With large a, there is a permanent growth advantage for producers when public goods are present, so delaying production of public goods also delays the advantage. For a = 0.2, QS is not only destructive in that it reduces mean extinction time, but with some initial population compositions it actually increases cheater fixation probability over AO. The results for Fig 3 change in a similar way with a (S8 Fig), except that the relative cheater fixation probabilities are less noticeably altered by a. Altogether, producer advantage, whether due to co-localization of producers or other mechanisms, shifts QS towards being destructive with respect to AO.

The destructive or constructive nature of QS depends on cost and constitutive growth
The phase diagram in Fig 1B demonstrates the role of both public good production cost and constitutive growth rate in determining the nature of QS outcomes. At low constitutive growth rates, public good production is essential to the survival of the population. With low λ 0 , QS regulation of public good production moves to the "mixed" region of the phase diagram at relatively low public good costs. This means that whether QS is beneficial to the population depends on the initial composition of the population. For low constitutive growth rates below We show the ratio T QS =T AO for all (n, m) pairs for two sequences of (c, λ 0 ) pairs in S10 and S11 Figs. With fixed c = 0.2, the ratio T QS =T AO is always highest with intermediate mixtures of producers and cheaters (S10 Fig). When λ 0 � 0.1, there is a transition from the mixed region to the constructive region, where (n, m) pairs with few cheaters appear to be slower to change to constructiveness with increasing λ 0 . With fixed λ 0 = 0.2, there is a gradual transition from destructiveness at low c to constructiveness at high c (S11 Fig). At moderate costs below c = 0.1, QS is destructive, with T QS < T AO for all (n, m) pairs. However, once the cost reaches 0.15, QS is no longer destructive, as the mean extinction time increases with respect to AO. In the transition range from c = 0.1 to c = 0.15, the ratio T QS =T AO is highest when the number of producers is low, suggesting that QS is most beneficial with those initial population structures. The QS gain in mean extinction time over AO is further increased by QS at a cost of 0.2, again most drastically when n is small.
The phase diagram displays some non-monotonic behavior in c and λ 0 , especially in the low λ 0 , high c region (Fig 1B). This is a result of calculating the fraction of (n, m) pairs where T QS > T AO , so that the phase diagram is a superimposition of results for each (n, m) pair. If we instead look at the fraction of (n, m) pairs where logðT QS > T AO Þ > d for a tolerance parameter δ, we can see that the non-monotonic behavior of the low λ 0 , high c region disappears with small, positive δ (S12 Fig). This indicates that in this region, the mean extinction times are relatively similar. On the other hand, with negative δ the destructive region with low c remains, indicating that T QS is notably smaller than T AO there. We can see the same patterns by looking at logðT QS > T AO Þ over λ 0 and c for a selection of (n, m) pairs (S13 Fig). This further reinforces that QS is most constructive with large λ 0 and c.

Discussion
Our model of competitive growth between bacterial producers and cheaters reveals a number of previously unexplored consequences of quorum sensing. We investigate the case of isolated, single subpopulations of bacteria as a first step towards understanding the impact of QS on bacterial eco-evolutionary dynamics. When public good production allows for metabolism of otherwise inaccessible sources of nutrients, we demonstrate the important role of both the availability of alternative, public good-independent nutrients and the cost of public good production in determining the consequences of quorum sensing. With no alternative nutrients, quorum sensing by producers withholds the only source of nutrients from the whole population, which harms both producers and cheaters in terms of the total population's mean extinction time. We identify this result as a possible example of demographically stochastic evolutionary suicide [37], as quorum sensing increases the relative fitness of producers while decreasing the mean extinction time of the entire population. If instead there is an alternate energy source, then regulating public good production via quorum sensing reduces the probability of cheater fixation, while in some cases increasing the mean extinction time of the population over the always on strategy and in other cases decreasing the mean extinction time, depending on the public good production cost.
The destructive region in Fig 1 can be understood heuristically by considering that, if the cost of public good production is low, QS-mediated regulation of public good production withholds the fitness benefits of the public good while achieving minimal metabolic savings for the producers. In addition, large alternate sources of nutrition can help to offset the costs of public good production, reducing loss in relative producer fitness due to costs. On the other hand, when public good production is costly, QS-mediated production balances costs and benefits by delaying public good production until the population of producers is large enough to benefit. Thus both public good production cost and constitutive growth rate play an important role in determining the eco-evolutionary consequences of QS-based regulation.
Because we have not explicitly modeled the evolution of the QS strategy, our suggestion that destructive QS is an example of evolutionary suicide requires further analysis. Specifically, the suggestion that QS could evolve when it falls in the destructive phase of Fig 1B is based only on the fact that QS results in lower cheater fixation probability, and hence in larger relative fitness as compared with cheaters, than the AO strategy. Additional work, including explicit modeling of QS evolution, is needed to confirm the connection with evolutionary suicide and would be an interesting direction for future research.
Future experimental work is needed to test the predictions of our model. Experimental techniques such as those used by Coates et al. [24] together with genetic manipulation of QS circuitry could provide an avenue for testing our predictions, and would provide invaluable insight into the role of QS in small bacterial populations. Further theoretical work could explore the impact of mutation, migration, and horizontal gene transfer on our results, where a stable heterogeneous steady state could be achieved. The effects of QS signaling heterogeneity [38][39][40][41] on our results could also be explored, whether due to stochastic gene expression, low diffusivity within biofilms, or other causes. Finally, further details concerning the complex nature of QS could be incorporated into the model, including the effects of nutrient levels on QS [5].

Model overview
We consider well-mixed populations of bacteria growing according to birth-death models with no mutation or migration (Fig 1A). Public goods are modeled implicitly through their costs and benefits as reflected in the birth rates. We write the birth rates as l Pr n;m and l Ch n;m for producers and cheaters, respectively. The subscript n and m are the number of producers and cheaters present, reflecting the dependence of the rates on the population state. The death rates are m Pr n;m and m Ch n;m . See Eqs 1-4 for full forms of the birth and death rates. Our model accounts for AI and public good production and degradation as well as densitydependent fitness benefits of public goods directly in the birth rates. This simplification rests on several assumptions. We assume that the timescales associated with AI and public good production and degradation are much faster than those of births and deaths. Under this assumption, the AI and public good concentrations quickly reach a steady state upon a bacterial birth or death, so that the effects of both concentrations on the birth rates is only a function of the state of the population. Similarly, the growth benefits of public goods are assumed to be a function of the current population state, namely a non-decreasing, saturating function of n.
Another assumption is that all individuals within a given strain (producer or cheater) exhibit exactly the same birth and death rates. In reality, the stochasticity of subcellular events and diffusion of extracellular molecules leads to heterogeneous growth rates even in clonal populations [41]. Our approach simplifies analysis while providing a description of mean birth and death rates.
In order to evaluate the long-term eco-evolutionary fates of mixed producer-cheater populations, we calculate the cheater fixation probability (π Ch ), mean first passage time to cheater fixation (τ Ch ), and mean population extinction time (T ) for all pairs of n producers and m cheaters where n + m � N. We define N as a maximal population size large enough that the line n + m � N effectively acts as a reflecting boundary. An appropriate choice of N then depends on the birth and death rates used. Solutions of all three quantities of interest come from solving backward Kolmogorov equations, as detailed in the Materials and Methods section. We validate the results from these solutions through stochastic simulations [42,43].

Birth and death rates
We use birth-death models to describe the population dynamics of a bacterial colony with both public good producers and cheaters. We assume the timescales of both autoinducer and public good production and degradation are much shorter than those of population growth. Consequently, we write per capita birth and death rates solely as a function of the number of producers and cheaters in the population. We also assume that QS is sensitive to population density. While a number of other explanations for the function of QS exist, as noted in the Introduction, all of them depend to some degree on population density.
The birth and death rates in our models take into account the costs and benefits of public good production. We use λ to denote birth rates and μ to denote death rates, with the superscript Pr for producers and Ch for cheaters. Let n be the number of producers in the population and m be the number of cheaters. Let λ 0 be the birth rate due to an alternative energy source that does not require proteases for bacteria to utilize, and let μ 0 be the constant death rate. We assume that the per-capita death rate increases linearly with the total population size through some density-dependent mechanism such as the production of toxic byproducts. We denote the maximal birth rate due to nutrients derived from protease activity as g and the additional birth rate gained by producers if they have preferential access to public goods (due to, for example, slow diffusion) as a. We denote the maximal cost of protease production, in terms of growth rate, as c. Parameters K g and K a control the number of producers for which protease-derived growth rate and protease production are half-maximal, respectively. Finally, h g and h a control the shape of the protease-derived growth rate and protease production rate functions. The full birth and death rates are l Pr l Ch n;m The Hill function forms of these rates are similar to those in previous work [44,45]. The strategy taken by a particular strain in controlling public good production is controlled by the parameters K a and h a . The parameter K a controls when public good production is half-maximal, while h a controls the shape of the activation curve. For an "always-on" strain, we take the limit K a ! 0 so that public good production is always maximal, independent of the producer population size. For a "no production" strain (equivalent to a cheater that produces autoinducer), we take K a ! 1 so that the public good is never produced.
We set the maximum birth rate due to public goods to g = 1 in all cases, so that all other birth rate parameters can be considered to be in units of maximum public good birth rate. In general we consider the parameters g, K g , h g , c, and λ 0 to be properties of the public good and environment which cannot be changed by bacterial strategy. Similarly, we consider the parameter μ 0 to be a joint property of the bacterial species and the environment. As we have stated, K a and h a constitute the choice of public good regulation strategy.
For the special case where cheaters produce autoinducer but not public goods, we modify the birth rates to l Pr under the assumption that producers and cheaters contribute autoinducer equally. The parameter values we have used are summarized in S1 Table.

Fixation probabilities and mean first passage times
The dynamics of the probability distribution over n and m at time t given n 0 and m 0 at an earlier time s (with s < t) is governed by the forward Kolmogorov equation For birth and death rates linear in n and m, the system of coupled differential equations represented by Eq 7 can be solved exactly using a generating function approach [46]. However, the birth and death rates required for our purposes are nonlinear, and we adopt a computational approach.
The main quantities of interest in this work are the probability of cheater fixation and the mean population extinction time. These quantities can be calculated from the backward Kolmogorov equation We define a maximum pure producer or cheater population size N and construct an (N + 1) 2 × (N + 1) 2 matrix describing the transition rates between all states and use it to solve for our quantities of interest. Given the birth and death rates we use, we assume that the approximation introduced by considering a finite rate matrix is reasonable when net growth rates are negative and have a large magnitude in all states where m = N or n = N. For the probability that cheaters will fix in the population, we solve [46] l Pr n;m ðp Ch nþ1;m À p Ch n;m Þ þ m Pr n;m ðp Ch nÀ 1;m À p Ch n;m Þ þl Ch n;m ðp Ch n;mþ1 À p Ch n;m Þ þ m Ch n;m ðp Ch n;mÀ 1 À p Ch n;m Þ ¼ 0 with boundary conditions p Ch For the mean first passage time conditioned on cheater fixation, we solve l Pr n;m ðy Ch nþ1;m À y Ch n;m Þ þ m Pr n;m ðy Ch nÀ 1;m À y Ch n;m Þ þl Ch n;m ðy Ch n;mþ1 À y Ch n;m Þ þ m Ch n;m ðy Ch n;mÀ 1 À y Ch n;m Þ ¼ À p Ch with the condition y Ch n;m ¼ 0; for n ¼ 0 or m ¼ 0; Similarly, for the mean extinction time we solve l Pr n;m ðT nþ1;m À T n;m Þ þ m Pr n;m ðT nÀ 1;m À T n;m Þ þl Ch n;m ðT n;mþ1 À T n;m Þ þ m Ch n;m ðT n;mÀ 1 À T n;m Þ ¼ À 1 with the condition T n;m ¼ 0; for n ¼ 0 and m ¼ 0: Directly solving the linear system of equations represented by Eq 15 can lead to numerical instability when the mean extinction times are large. To account for these numerical issues we also calculated the mean extinction time using the analytical formula for pure producer or cheater populations with adjoint reflecting boundary conditions at n = N and m = N [47][48][49] and direct calculations of fixation probabilities for each point along the pure producer and cheater axes. We use the notation p i;0 n;m and p 0;j n;m to indicate the probability that a population starting with n producers and m cheaters will have producers fix with i total producers and will have cheaters fix with j total cheaters, respectively. We then estimate the mean extinction time according to under the assumption that producers or cheaters will quickly fix followed by a much longer period with a pure population before extinction.

Stochastic simulations
Stochastic simulations were performed using Gillespie's algorithm [42,43] implemented in the Gillespy2 Python package [50]. Each simulation was run until population extinction and was repeated 100 times in order to estimate fixation probabilities and mean first passage times.

General methods
The figures in this article were created using Inkscape 0.92 and Matplotlib 3.1.1 [51] in a Python 3.7 Jupyter Notebook [52]. All fixation probabilities and mean first passage times were calculated using the linear system solver in the Python NumPy package [53] and the sparse matrix module of the SciPy package [54]. Bottom row: the zero expected net growth contour contours for QS producers (red), QS cheaters (orange), AO producers (black), and AO cheaters (grey). For λ 0 = 0 the two QS zero expected net growth contour contours are identical and the two AO zero expected net growth contour contours are also identical. As λ 0 is increased, the AO producer contour approaches the producer axis faster than the QS producer contour. See S2 Table for parameter  We define a tolerance, δ, so that the above plots display the fraction of (n, m) pairs with logðT n;m:QS =T n;m:AO Þ > d. Fig 1B corresponds to δ = 0. With slightly larger δ, the region with higher fraction around λ 0 = 0.05, c > 0.2 rapidly disappears. This demonstrates that the QS mean extinction times are only slightly larger in this region. With no cost of public good production (c = 0), K a has no effect on cheater fixation probability. For all other examined costs, the fixation probability monotonically decreases as a function of K a for all examined λ 0 values. This behavior suggests that the NP strategy, characterized by K a ! 1, minimizes the cheater fixation probability. (TIFF) S16 Fig. Trade-offs between suppressing cheaters and decreasing the time to stochastic clearance of a pure producer population, as controlled by K a , are present for λ 0 > 0 but absent when λ 0 = 0. In the left figure, increasing K a has no effect on mean extinction time, so that loss of public good production altogether (K a ! 1) minimizes cheater fixation probability compared with AO. Here, we calculated the log-ratio of mean extinction times, logðT 1;0:QS =T 1;0:AO Þ, and the log-ratio of cheater fixation probabilities, logðp Ch n ? ;1:QS =p Ch n ? ;1:AO Þ, for all 625 different combinations of K g , K a 2 {10, 15, 20, 25, 30} and h a , h g 2 {1, 2, 3, 4, 5}. Each point on the plot represents the results for one of the 625 parameter combinations. We calculated mean extinction times for n = 1 producers and m = 0 cheaters, corresponding to the case where a single producer is colonizing an otherwise empty region of space. We calculated cheater fixation probabilities for n ? ¼ round l 0 þgÀ c m � � producers and m = 1 cheater, the relevant initial population composition for the case of a single cheater arising by mutation in a population or producers. The highlighted points show how varying K a alone affects the results (K a = 15, used in Figs 2 and 3, is indicated by a star), with K g , h g , and h a fixed as in Figs 2 and 3. (TIFF) S1